package chixing.day06.interited;

public  abstract class Account {
    //将Account作为父类
    private String accNo;
    private String accName;
    private String accPersonId;
    private long accTelno;
    private double accBalance;
    public Account() {
        }
        public Account(String accNo, String accName, String accPersonId, long accTelno, double accBalance) {
            this.accNo = accNo;
            this.accName = accName;
              this.accPersonId = accPersonId;
            this.accTelno = accTelno;
            this.accBalance = accBalance;
        }
    //存款
    public abstract double deposit(double money);
    //取款
    public abstract double withdraw(double money);

    public String getAccNo() {
        return accNo;
    }

    public void setAccNo(String accNo) {
        this.accNo = accNo;
    }

    public String getAccName() {
        return accName;
    }

    public void setAccName(String accName) {
        this.accName = accName;
    }

    public String getAccPersonId() {
        return accPersonId;
    }

    public void setAccPersonId(String accPersonId) {
        this.accPersonId = accPersonId;
    }

    public long getAccTelno() {
        return accTelno;
    }

    public void setAccTelno(long accTelno) {
        this.accTelno = accTelno;
    }

    public double getAccBalance() {
        return accBalance;
    }

    public void setAccBalance(double accBalance) {
        this.accBalance = accBalance;
    }
    class SavingAccount extends Account {
        public SavingAccount() {
            super();
        }

        @Override
        public double deposit(double money) {
            return 0;
        }

        @Override
        public double withdraw(double money) {
            return 0;
        }
    }
    class CreditAccount extends Account {
        public CreditAccount() {
            super();
        }

        @Override
        public double deposit(double money) {
            return 0;
        }

        @Override
        public double withdraw(double money) {
            return 0;
        }
    }
    public String toString() {
        return "Account{" +
                "accNo='" + accNo + '\'' +
                ", accName='" + accName + '\'' +
                ", accPersonId='" + accPersonId + '\'' +
                ", accTelno=" + accTelno +
                ", accBalance=" + accBalance +
                '}';
    }
}
